package org.rugby.online.core.exception;


public class RboException extends Exception {

	/**
	 * Serial 
	 */
	private static final long serialVersionUID = -7212863239104672723L;
	
	private RboExceptionType exceptionType;
	
	public RboException(RboExceptionType type) {
		super("No message given");
		this.exceptionType = type;
	}
	
	public RboException(RboExceptionType type, String message) {
		super(message);
		this.exceptionType = type;
	}

	public RboException(RboExceptionType error, String string, Exception e) {
		super(string, e);
		this.exceptionType = error;
	}

	public RboExceptionType getExceptionType() {
		return exceptionType;
	}

	@Override
	public String getMessage() {
		return this.getExceptionType().toString() + " : " + super.getMessage();
	}

}
